package com.example.androidframework.ui.course.pkblood

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.example.androidframework.R
import com.example.androidframework.databinding.ActivityPkBloodBinding
import com.martin.lib_base.base.BaseActivity
import com.martin.lib_base.impl.EmptyViewModel

class PkBloodActivity : BaseActivity<ActivityPkBloodBinding, EmptyViewModel>() {
    override fun getViewModelClass(): Class<EmptyViewModel> {
        return EmptyViewModel::class.java
    }

    override fun layoutId(): Int {
        return R.layout.activity_pk_blood
    }

    override fun initOnCreate(savedInstanceState: Bundle?) {
        binding.leftAdd.setOnClickListener {
            binding.blood.leftNumber++
        }
        binding.rightAdd.setOnClickListener {
            binding.blood.rightNumber++
        }
        binding.rightReset.setOnClickListener {
            binding.blood.leftNumber = 0
            binding.blood.rightNumber = 0
        }
    }

    companion object {
        fun start(context: Context) {
            val intent = Intent(context, PkBloodActivity::class.java)
            context.startActivity(intent)
        }
    }
}